added cookie session management, handlers: +login, logout, segmented into modules