Added pre-authentication and logout function