Added security key to server and restricted functions