introduced test database and login/logout in tests; fixed parameter saving in manual_fit