Completed first version of login.