Added env switch. Added Users API methods, tests