Fixing the authentication and adding a new template