Login Fix

Fixed SQL query which establishes amount of time an organization has
been unpaid to fix a bug which was causing the wrong duration to be
returned.