added user functionality & session management