Refactor loginController

to use notificationHistory instead of alert.