updated authentication workflow. Auto reject login if the server is offline