cleaned up login/logout