login and logout updated