struggling with login/logout