add login and logout user functionality
making some mods and squashing some bugs