Insert redirect parameter value with format method
Reduce complexity of login method