saving and fetching users in database