tidy login and registration and add logout