refactored the callback out of the login submission process into its own object to try to make things more testable