updated login function to show error
updated login view to show error message