begin implementation of the user and session functions