Finished login check and logout