updating license and adding some code documentation
fixing auto login bug