Added error if login is invalid