Sample Login/Register form written in Javascript and PHP