fixed user login variable NULL bug --KW