fixed logout bug, added redirect to homepage on register/logout