Got the funcationality with the server and the phone id
Made some changes to the javascript for better UI (alerts and stuff)