fixed some stuff related to moving the login code around.