Fixed the method validateAPIRequest to be more flexible for validating presence of any data.
Updated the redirectURL method to be more universal.