Added support for redirection from APNS and openFromURL