fixed null pointer exception for incorrect login