Added login support for legacy users