User class and related Database functions