updated login.js to display error on failed logins