Added login code