added first authentication functions to api