Support for logging out and flash if user needs to be logged in