added user and session functionality