Adds session api for authentication