login/logout bug fixed