Index: trunk/wp-login.php
===================================================================
--- trunk/wp-login.php	(revision 7956)
+++ trunk/wp-login.php	(working copy)
@@ -341,13 +341,13 @@
 
 case 'login' :
 default:
+	$user = wp_signon();
+
 	if ( isset( $_REQUEST['redirect_to'] ) )
 		$redirect_to = $_REQUEST['redirect_to'];
 	else
 		$redirect_to = 'wp-admin/';
 
-	$user = wp_signon();
-
 	if ( !is_wp_error($user) ) {
 		// If the user can't edit posts, send them to their profile.
 		if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) )

