fixed api authenticate