fixed user/pass to template logic