Overhauled login and logout process, involving rewriting Javascript in Coffeescript, and modifying some server code