final version of login