add login redirect in template