Added redirect mode for login