Upated format_timedelta to show past times
Updated login to check if the login token already exists on the server