added database scripts (login procedure stable)