fixed a few issues with login redirect, closed #62