added more code to authorize room entry