Fixed issue #597

Changed the code so when the enter key will only work to call the login function when the he focus is on the password field and not on both input fields.