working login, register and dashboard with mysql, json