Login redirect

Adresses issue #1017