Fix issue 38 where cannot navigate away form signin page.
Fix unit tests and jshint issues