your page form is connected with php and php gets the data from form input and than stores in mysql.
basically php takes care of the sign up and login. your hosting takes care of the server where the information is stored and all your other files.
while we are talking about HTML, these are just forms that submits data to server. the 'magic' have to happen on the server side. just remember - html or better http protocol is stateless, so you have to use something like cookie to keep info of your server session.