does not login when exiting dialog