Added logic for a persistent login