Logs out the user only when the auth-code is valid
Adds user-agent ignore