Check Auth and logout