View for an admin to log her/himself out and login the anonymous user.

def anonymous_login_view(request):
    ''' View for an admin to log her/himself out and login the anonymous user. '''
    logout(request)
    try:
        spineless = User.objects.get(username=ANONYMOUS_USERNAME)
    except User.DoesNotExist:
        random_password = User.objects.make_random_password()
        spineless = User.objects.create_user(username=ANONYMOUS_USERNAME, first_name="Anonymous", last_name="Coward", password=random_password)
        spineless.is_active = False
        spineless.save()
        spineless_profile = UserProfile.objects.get(user=spineless)
        spineless_profile.status = UserProfile.ALUMNUS
        spineless_profile.save()
    spineless.backend = 'django.contrib.auth.backends.ModelBackend'
    login(request, spineless)
    request.session['ANONYMOUS_SESSION'] = True
    messages.add_message(request, messages.INFO, MESSAGES['ANONYMOUS_LOGIN'])
    return HttpResponseRedirect(reverse('homepage'))