add proper redirection support
persistence will be added on the android side.