make login/logout work