Trying to solve Endpoints authentication