Simple javascript authorization service