Started adding interface for authentication.
Added authentication and fixed map.
Simplified the template hierarchy