edit a bit the login and logout codes