Added login handling.