Find or create user in database