Session api

Implemented the API for logins sessions.