Sets error message when login fails