applied devise authentication to user model