updated for authentication