added authentication and sessions