added registration and session functionality as well as log collection on the db