added user authentication and sessions