Authentication working for logging in and registering.