Begins LOGOUT logic