make a refresh config function for timedout errors on login regisrtation