Cleanup
Added CheckUserAccess function