fixed getTokenFromUrl