add saving of login var