fix compilation error for session function
implemented authenticated_handler for index page
refactor session management to session.ml