replaces api authentication with session authentication (frontend)