def login(request):
    """Login view for GET requests."""
    logged_in = request.authenticated_userid is not None
    if logged_in:
        return {'logged_in': True, 'form_enabled': False, 'status':
            u'Already logged in', 'status_type': u'info'}
    status = u''
    status_type = u''
    return {'form_enabled': True, 'status_type': status_type, 'status':
        status, 'logged_in': False, 'username': request.params.get(
        'username', u'')}
