adding api key for users and other bugfixes