first working version of login