I like New Wave Coffee quite a bit, located on Milwaukee just southeast of the Logan Square square, but they close at 11:00 p.m., and you did specify 10:00 to midnight.
Cafe con Leche, which is on Milwaukee just north of the square, turns into a restaurant called D'Noche that remains open until 1:00 a.m. on weekends; call to confirm, but they could probably provide what you seek, when you seek it.
Heavenly Ice Cream is on that same block; they serve coffee and treats, and they will make you an affogato (espresso poured over gelato or ice cream). Like New Wave Coffee, Heavenly is only open until 11:00. (Also a disclosure, I know the owner of Heavenly, who was one of Mrs. JimInLoganSquare's classmates in acupuncture school.)
JiLS