Handle undefined data on 'auth' event for AuthAppController

When switching tabs on our /login route, the scope.on 'destroy' is
fired in the AuthController which emits an auth event with undefined
data value.

Our AuthAppController was trying to check the data.userid for this
undefined value. We only need to do that when data is undefined.

Fixes #1627