updated for user class with authentication