moved getSession function to Login class