Fix user model detection + upgrade loopback to 2.x 

Fix the code detecting User model to support both `User` model itself and models extending `User`.

Close #10.

/to @ritch please review