login and out with mysql