refactored Angular user login functionality into separate loginCtrl file