I was using another script that was doing the same thing and experimented with that. I added the following to my .htaccess and I was no longer being kicked out of the admin:

php_value max_execution_time 6000000
php_value max_input_time 600000
php_value output_buffering On

I also put this in the php.ini in the same directory just to be sure

max_execution_time 6000000
max_input_time 600000
output_buffering On

Try it and see if that works for you. For vShare, my webhost had to do something special to my site, not sure what, but they fixed it.