Updated dev version which protects server functions from users without permission to use them