Allow a user to generate and log in with an API key