Updated to allow users to set a register flag so they're redirected directly to the registration page instead of to the login page, therein losing the oauth callback.