The variables array generated here is a mirror of template_preprocess_page().
This preprocessor will run its course when theme_maintenance_page() is
invoked.
A validate handler on the login form. Check supplied username/password
against local users table. If successful, $form_state['uid']
is set to the matching user ID.