Log last-used IP in User object

This should fix #1005, but I'm not very familiar with mongoose and express, so I may have done something wrong.