cleaned up globals, made login use the standard window