<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def handle_login_failure(self, provider, reason):
 """Message user and redirect on error."""

        logger.error('Authenication Failure: {0}'.format(reason))
        messages.error(self.request, 'Authenication Failed. Please try again')
        return redirect(self.get_error_redirect(provider, reason))