Added authentication to user model