added login, logout, restriction, and a base template