initial version of login status controller

some effort to fix unit testing, but did not proceed that great