Pass validated username to check_login_simple
Pass validated username to check_login_simple

The login function in mediagoblin/auth/views.py grabs the username prior to form validation. If validation passes, the pre-validated username is passed to the check_login_simple function.

Lowercasifying of the username occurs as part of form validation. By sending the pre-validated username, there's a chance of sending a username with uppercase letters. This will fail to match any user ids in the database, as all of the usernames are lowercased during the registration process.

This change sends the post-validated username to check_login_simple, so that any username that was entered by the user with uppercase letters has a chance to be properly lowercased before being passed.

Copied from https://gitorious.org/mediagoblin/aylephs-mediagoblin/commit/dc52d4493f6da24f2aba6d7616f6b6596c6181c8
ayleph/mediagoblin-recaptcha,ayleph/mediagoblin-recaptcha