realized that email was asked for instead of username. refactored accordingly