Add authnticate method into user model.