Cleaning up Authenticate logic