finished first version of login