Added login conditions