Add half-finished escape sequence processing

Includes updated login logic