Added login functions and session classes