Implemented support for multiple users and fixed broken tests