Implement user login functionality. Improve http promise support for both user register and user login in order to handle the async calls better. Fix an issue with form submission, in which the form had to be submitted twice due to promise handling issue.