Added login storage and other bug fixes