Login System Based on Code that Reads a Text File

My intent is to create a login page on my website with html, css, javascript or any other scrripts.
I would like to try and have it so that the code reads this text file:
` — Scans First and Compares to Input —
Email =
UserName =

— Scans Second and Compares to Input —
Password =

— Scans Third and Uses as Output —
UserID =
ProfilePicture = `

What happens theoretically is that the code reads line 2, col 9 to end of line 2 and compares the email to the input. Then the code reads line 6, col 12 to end of line 6 and compares the password to the input. Then the code reads the UserID and ProfilePicture info from line 9, col 10 to end of line 9 and line 10, col18 to the end of line 10. Then the code sets the username and profile picturre and the user info on that client.

I have been unable to find any information on how to do this and cannot figure it out myself. If there is any other of better way to do this, please let me know.

Thanks for any help!