logout and login errors fixed