Fix authorized endpoint bugs