Fix for pressing Enter key on login form

Previously this was throwing a hard API error.