basic login / register form with some javascript logic