added working index, register and login phps