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 #59.

/to @ritch please review
Won't this only detect if the model is the built in user model? What if it inherits from User?