added login function (not yet working). please work on it ASAP.