Implemented Oauth and templating