Added preferences saving for login information