Fixed bug where a successful log-in didn't redirect the user