Creating a separate function for session logging out. Renaming a function.