Fix login crash