Fixed problems with auth template