Fixed the session error, forgot to start the session in the logout function.