added login/logout stuff