Guard against passed in nil user on sign_in

`sing_in` gets called, passing in `user` straight from the client code,
and can result in `user` being `nil`.

This problem was surfaced by #332