change URL only after the page has been loaded
cleaned up commented code
fixed lock for PublishLoner actions