Add exists and insert functions to user model. Use user model for register