Fix for pressing Enter key on login form

Previously this was throwing a hard API error.
Merge pull request #469 from adaptlearning/enter-key-login

Fix for pressing Enter key on login form