fix api_base_path setting and setup token expiration