working login/logout, templates added