Fixed - Replaced empty() with is_null() so it doesn't drop and properly pass 0 or empty string values.
Fixed missing $companies and lastRequest in createUser().
Added optional sessionCount.