Add support for reloading tabs on account cahnge.

Also do some general cleanup on the code base to bring it more in line with Chrome guidelines for security.