added redirect functionality for login_failure