handle login failures and display messages