Updating changes for user authentication and access restriction. Testing is still needed here