redirect after sign in from anywhere

This request solved #407. Please review and merge it. Thanks!