PHP OOP login/register system & JS