Bugfix: Become user would throw an exception in the frontend.

Added a Selenium test to exercise this functionality, and a bonus little
utility function to give you a REPL when writing/debugging Selenium
tests.