Setup user model and authentication logic