Added session timeout function and fixed externship upload paths issue