Fix redirect bug in login ctrl