[Front-end] Refactored login to use a factory that encapsulates more logic such as sanitizing credentials and showing success/failure messages, added logout, isLoggedIn. Also, it'll be ready to store any xsrf tokens in sessionStorage.