Refactored Login Factory to better suit my needs and relying on PHP sessions