added some simple session management (login, logout, register)