Added login funct.