Redirect to login url with next param set as request.url

def unauthorized_callback(self):
        """
        Redirect to login url with next param set as request.url
        """
        return redirect(self.login_url(params=dict(next=request.url)))