Fixed type of return from users db
Fixed returned type in authenticate