code: def redirect_profile(request):
      '''
      The default destination from logging in, redirect to the actual profile URL
      '''
      if request.user.is_authenticated:
          return HttpResponseRedirect(reverse('wafer_user_profile',
                                              args=(request.user.username,)))
      else:
          return redirect_to_login(next=reverse(redirect_profile)f redirect_profile(request):
      '''
      The default destination from logging in, redirect to the actual profile URL
      '''
      if request.user.is_authenticated:
          return HttpResponseRedirect(reverse('wafer_user_profile',
                                              args=(request.user.username,)))
      else:
          return redirect_to_login(next=reverse(redirect_profile))
docs: The default destination from logging in, redirect to the actual profile URL