login now uses Promises, like registration. Reading back through codebase to reacquint myself with AngularJS