login enforcement wokring after cutting out some jQuery