Handles login errors.