PHP scripts to login a user and save credentials