[fix bug 976099] Redirect to current page after logging in.

move this to line 73