adding function for 'smart' login/out button

* triggers the modal dialog box login form
* just getting it functional, eventually would like a more modular,
elegant solution