Implementation of the login service and improvement to the ui.