Errors corrected login and logout