added user/session functionality