fixed bugg with tests. added functional tests for loggged in vs. no