He doesn't call the object method $user->redirect_to_login, but the subroutine GWAK::User->redirect_to_login which should work even when the creation of the $user object failed.
Aside from this, it would be very helpful if the relevant parts of the GWAK module were provided here.