Trying to resolve login redirect problem