Shay Logan completes loan move to Hearts